package com.million.artservice.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.million.artservice.entity.Article;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.million.artservice.entity.vo.ArticleVo;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 文章 Mapper 接口
 * </p>
 *
 * @author 十麓
 * @since 2022-04-17
 */
public interface ArticleMapper extends BaseMapper<Article> {

    //根据文章id 获取文章详情 编写sql
    ArticleVo queryArticleById (String articleId);

    //分页条件查询 返回Vo 集合 要分页的
    Page<ArticleVo> queryArticlePageConditions (Page<ArticleVo> articlePage, @Param(Constants.WRAPPER) QueryWrapper<ArticleVo> articleQueryWrapper);
}
